import { IGraph } from './graph'

export interface IRectangle extends IGraph {
  color: string
}
// 单一职责原则
export class Rectangle implements IRectangle {
  constructor(
    public width: number,
    public long: number,
    public color: string
  ) {}

  area() {
    return this.width * this.long
  }
}
